<?php
function smarty_function_referer($params, $template)
{
    if(!isset($params['mode']))$params['mode']='input';
    switch ($params['mode']) {
    	case 'link':
    		return '<a href="'.base64_decode(Vars::_(Core::REFERER)).'" title="'.T::_('Back').'">'.T::_('Back').'</a>';
    		break;
    	case 'url':
    		return base64_decode(Vars::_(Core::REFERER));
    		break;
    	default:
    		return '<input type="hidden" name="'.Core::REFERER.'" value="'.Vars::_(Core::REFERER).'" />';
    		break;
    }
} 

?>